package com.ddj.util;


import java.sql.Timestamp;
import java.text.SimpleDateFormat;

import org.hibernate.type.DateType;

public class MyTime {
    public java.sql.Date getDate(){
	java.util.Date date = new java.util.Date();
	java.sql.Date date2 = new java.sql.Date(date.getTime());
	
	return date2;
	
    }
    public Timestamp getTime(){
	java.util.Date date = new java.util.Date();
	//java.sql.Time time = new java.sql.Time(date.toString());
	java.sql.Timestamp t= new Timestamp(date.getTime());
	return t;
	
    }
    public static void main(String[] args) {
	System.out.println(new MyTime().getDate());
	System.out.println(new MyTime().getTime());
    }
}
